#include <iostream>
using namespace std;

int main()
{
    int a[] = {0,1,2,3,4,5,6,7,8};
    int* p = &a[7];

    cout << *p++;
    cout << *p;

    cout << *--p;
    cout << *p;

    int b = 100;
    //++b--;//this will cause compiling error:non-lvalue in increment
    // post increat has higher priority than pre-increment
    cout << endl;
    cout << "b is :"<< b << endl;

    struct str_t
    {
        int* m;
    };
    str_t str;
    str_t* pstr = &str;
    cout << (int*)pstr->m << endl;//-> has higher priority

    *p++;// *(p++)
    *p--;// *(p--)

    int* pi[10];
    int** ppi = &pi[0];
    *ppi[10];//[] has higher priority than *    
}
